home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 47.7z / BS1 part 47 / ImageMaster RT v1.50b (1994)(Black Belt Systems)(Disk 1 of 7)[HD].7z / ImageMaster RT v1.50b (1994)(Black Belt Systems)(Disk 1 of 7)[HD].adf / install-im < prev    next >
Encoding:
Text File  |  1994-04-19  |  29.8 KB  |  825 lines

  1. ; --------------------------------------------------------------
  2. ; CBM installer script to install Imagemaster R/t on users
  3. ; hard-drive. Loosely derived from the original Imagemaster
  4. ; installation script.
  5. ; --------------------------------------------------------------
  6. ;  Copyright 1993,1994, Black Belt Systems, ALL RIGHTS RESERVED
  7. ; --------------------------------------------------------------
  8. ;     Written by: Ben Williams
  9. ;   Date Written: July 26th, 1993
  10. ;            For: Imagemaster R/t
  11. ; --------------------------------------------------------------
  12. ;        Updates
  13. ;        -------
  14. ;September 01/93: Now deletes the old .info file on re-installs
  15. ;                 so that new icon shows up.
  16. ;
  17. ;September 13/93: Now asks user if they wish to have ApAsisst
  18. ;                 placed in c: (which is suggested)
  19. ;
  20. ;September 16/93: Now adds a path add statement to the user's
  21. ;                 shell-startup file so that ApAssist and
  22. ;                 Imagemaster can run successfully from shell;
  23. ;                 Also copies "ReadMeFirst" document into the
  24. ;                 Imagemaster R/t install directory.
  25. ;
  26. ;    March 28/94: Modified to work with early assigns as target
  27. ;                 to get around extraction utility's problem with
  28. ;                 spaces in paths. Modified to be smarter about
  29. ;                 ApAssist installation. Modified to be smarter
  30. ;                 about float & non-float archive fragments, uses
  31. ;                 less ram during install. If there is NO
  32. ;                 s:user-startup file, we'll create one for the
  33. ;                 user. "imblock" file changed to remove leading
  34. ;                 space for BEGIN and END segments; this was
  35. ;                 preventing SMOD from correctly removing the
  36. ;                 older block. Changed to 7 disk install to
  37. ;                 accomodate large expansion in documentation
  38. ; --------------------------------------------------------------
  39. ;Notes:
  40. ;------->
  41. ;  (1) We force a minimum level of AVERAGE user so that they
  42. ;      must specify the target directory for the install and
  43. ;      answer some basic questions such as "Do you have an FPU"
  44. ;
  45. ;  (2) There must be sufficient diskspace to install the software
  46. ;      or we won't even try to install.
  47. ;
  48. ;  (3) The ARexx REXX assign must be available, or we can't install
  49. ;
  50. ;  (4) If the user has already assigned targets for ALL of:
  51. ;           RXPI:
  52. ;           CMPI:
  53. ;           IMDOC:
  54. ;           IMCAT:
  55. ;      Then we will not attempt to create directories in the
  56. ;      Imagemaster R/t drawer for them. Instead, we will install
  57. ;      the relevant portions of the software to the specified
  58. ;      locations. This MAY defeat the available space checking
  59. ;      code in the install script, if these locations are on
  60. ;      a different volume than the target volume.
  61. ;
  62. ;------------------------------------------------------------------
  63.  
  64. ; Install script is initiated from disk one of the install group,
  65. ; so we do all things we possibly can from disk 1, first.
  66. ; Disk 1 is where most of the miscellaneous items are stored.
  67. ;----------------------------------------------------------------
  68.  
  69. ; cleanup routine
  70. ;----------------
  71. (onerror)
  72.  
  73. ; Create disk filesystem names and volume names
  74. ; Some installer functions want the ":" character, and
  75. ; some don't. Another blow for consistancy in programming.
  76. ; --------------------------------------------------------
  77. (set d1 "IM_Install1:") (set v1 "IM_Install1")
  78. (set d2 "IM_Install2:") (set v2 "IM_Install2")
  79. (set d3 "IM_Install3:") (set v3 "IM_Install3")
  80. (set d4 "IM_Install4:") (set v4 "IM_Install4")
  81. (set d5 "IM_Install5:") (set v5 "IM_Install5")
  82. (set d6 "IM_Install6:") (set v6 "IM_Install6")
  83. (set d7 "IM_Install7:") (set v7 "IM_Install7")
  84.  
  85. ; This IM R/t release is (approximately) sized as follows:
  86. ;---------------------------------------------------------
  87. (set misc_spc 50000)
  88. (set imrt_spc 2100000)
  89. (set film_spc 180000)
  90. (set isha_spc 25000)
  91. (set devl_spc 10000)
  92. (set pimo_spc 2000000)
  93. (set apas_spc 90000)
  94. (set adoc_spc 3161088)
  95.  
  96. ; Make certain rexx: directory exists - if ARexx isn't running, we
  97. ; can (sortof) live with that, though the user will be seriously
  98. ; crippled in capability. If no assignment exists, we're toast
  99. ;-----------------------------------------------------------------
  100. (if (= (getassign "rexx") "")
  101.     ( ; Then...
  102.         (abort "Cannot install - no REXX: assignment in this system. "
  103.                "You MUST have ARexx and a drawer assigned to REXX: "
  104.                "to hold ARexx scripts in order to successfully "
  105.                "install Imagemaster. Please properly configure "
  106.                "your computer and try again. If you do not know how "
  107.                "to accomplish this, call your dealer or consultant."
  108.         )
  109.     )
  110. )
  111.  
  112. ; Find out where user wants to put Imagemaster
  113. ;---------------------------------------------
  114. (set user_place
  115.     (askdir
  116.         (prompt "On which Volume shall we place the Imagemaster DRAWER? ")
  117.         (help @askdir-help "It is important that you realize that the destination volume you specify "
  118.                            "here is where the DRAWER in which Imagemaster and its associated data "
  119.                            "files will be placed. Even if this is an update to an earlier "
  120.                            "installation, you still need to specify this location the same way. "
  121.                            "Otherwise, a new \"Imagemaster\" drawer will be created INSIDE your "
  122.                            "old one, causing much confusion and not amusing anyone.")
  123.         (default @default-dest)
  124.     )
  125. )
  126.  
  127. ; Check to see if assigns are already made
  128. ; This accounts for custom installs by techno-types
  129. ;--------------------------------------------------
  130. (set as_made 0)
  131. (if (<> (getassign "rxpi:") "")
  132.     (if (<> (getassign "cmpi:") "")
  133.         (if (<> (getassign "IMDOC:") "")
  134.             (if (<> (getassign "IMCAT:") "")
  135.                (set as_made 1) ; All four assigns must be made!
  136.             )
  137.         )
  138.     )
  139. )
  140.  
  141. ; Find out if user wants the developer code
  142. ;------------------------------------------
  143. (set dev_install
  144.     (askoptions
  145.         (prompt "Would you like to have the Public Interface developer "
  146.                 "C and ARexx code, with documentation? This will allow "
  147.                 "you to create public interface modules of your own, IF "
  148.                 "you own the SAS C compiler and have typical Amiga "
  149.                 "developer skills.")
  150.                 (help @askoptions-help "If you are NOT a technical type, "
  151.                 "you have no need for this data. If you are, then by all "
  152.                 "means install it!")
  153.         (choices "Install SAS C and ARexx developer code?")
  154.         (default 0)
  155.     )
  156. )
  157.  
  158. ; Check with user if they want the floating point version
  159. ;--------------------------------------------------------
  160. (set float_install
  161.     (askchoice
  162.         (prompt "Install the hardware floating-point version? ")
  163.         (help "An FPU is a special hardware mathematics processor "
  164.               "which allows a computer which uses it to figure out "
  165.               "answers to math problems using floating point math "
  166.               "much faster than it could without an FPU. A 68000 "
  167.               "Amiga has no FPU. 68020 or 68030 based-Amigas may "
  168.               "have an FPU - check your documentation if you're not "
  169.               "certain. 68040-based Amigas always have the FPU built "
  170.               "right in. The non-FPU version will work on an Amiga "
  171.               "with an FPU, however it will be much slower which "
  172.               "will cost you unecessary time when processing images. "
  173.               @askchoice-help)
  174.         (choices "Install Floating Point (FPU) version"
  175.                  "Install standard (NON-FPU) version")
  176.         (default 1)
  177.     )
  178. )
  179.  
  180. ; Derive total install space
  181. ; for required elements of installation:
  182. ; ----------------------------------------------------------------
  183. (set total_size imrt_spc)                ; Imagemaster R/t
  184. (set total_size (+ total_size film_spc)) ; Filmstrip Viewer
  185. (set total_size (+ total_size isha_spc)) ; IShapes files
  186. (set total_size (+ total_size pimo_spc)) ; PI Modules
  187. (set total_size (+ total_size adoc_spc)) ; Hypertext Documentation
  188. (set total_size (+ total_size misc_spc)) ; Any remaining items...
  189.  
  190. ; Add space for developer code, if desired
  191. ; ----------------------------------------
  192. (if (= dev_install 1)
  193.     ( ; Then...
  194.         (set total_size (+ total_size devl_spc)) ; Developer Code
  195.     )
  196. )
  197.  
  198. ; Decide if we can install ApAssist in the c: directory
  199. ; If we can, we do it immediately, before we do the rest
  200. ; of the install - this will ensure that the disk space
  201. ; check will take it into account if it is on the same
  202. ; volume by virtue of its already taking up space; if
  203. ; it's not on the same volume, then we won't "see" it in
  204. ; the disk space check, and that works fine too. This
  205. ; install comes from disk one:
  206. ; -----------------------------------------------------
  207. (set app_in_c 1) ; assume ApAssist will fit in c:
  208. (set app_space  (getdiskspace "c:"))
  209. (copyfiles (source d1) (dest "ram:") (pattern "ApAssist") (files))
  210. (if (< app_space apas_spc)
  211.     ( ; Then must go to IM R/t directory
  212.         (set app_in_c 0)
  213.         (set total_size (+ total_size apas_spc)) ; ApAssist executable
  214.     )
  215.     ( ; Else _could_ go in c:
  216.       ; Find out if user wants ApAssist in c:
  217.       ;--------------------------------------
  218.         (set apa_install
  219.             (askoptions
  220.                 (prompt "It has been determined that you do have enough "
  221.                         "free space on the volume that your c: assignment "
  222.                         "points at to install ApAssist in c:. This is the "
  223.                         "suggested location, the most generally useful. If "
  224.                         "for some reason this is not acceptable, ApAssist "
  225.                         "will be installed in the Imagemaster R/t drawer "
  226.                         "along with the rest of the software.")
  227.                         (help @askoptions-help
  228.                         " ApAssist is Black Belt Systems' hypertext online "
  229.                         "Documentation system. It runs the online manual "
  230.                         "for Imagemaster R/t; the reason that it is a very "
  231.                         "good idea to place it in your c: assigned location "
  232.                         "is because in this location, other software can "
  233.                         "also use it (because c: is always part of the "
  234.                         "path AmigaDOS searches for commands.)")
  235.                 (choices "Install ApAssist in your c: assigned location?")
  236.                 (default 0)
  237.             )
  238.         )
  239.     )
  240. )
  241.  
  242. ; At this point, we've got a pretty good handle on installation
  243. ; storage requirements, with the possible exception of if the
  244. ; user has created custom assignments for all of RXPI, CMPI,
  245. ; IMDOC and IMCAT - in which case we can mistakenly abort here
  246. ; if the target disk is short on space. Hopefully a technically
  247. ; competant user such as would intentionally redirect the
  248. ; installation using assigns will manage their system well
  249. ; enough to avoid that problem. If we can't do the main install,
  250. ; we quit immediately with an informative message.
  251. ; -------------------------------------------------
  252. (set tgt_space  (getdiskspace user_place))
  253. (if (< tgt_space total_size)
  254.     ( ; Then...
  255.         (abort "This installation requires about " ("%ld" total_size)
  256.                " bytes free on the "
  257.                "volume where you wish to install Imagemaster. Please "
  258.                "make this space available and then re-install. For your "
  259.                "information, the volume you have selected has only "
  260.                ("%ld " tgt_space) "bytes free. You need "
  261.                ("%ld " (- total_size tgt_space)) "more bytes."
  262.         )
  263.     )
  264. )
  265.  
  266. ; Get the items we need from disk 1
  267. ;----------------------------------
  268. (if (= float_install 0)
  269.     ( ; Then...
  270.         (copyfiles (source d1)
  271.                    (dest "ram:")
  272.                    (pattern "(bss|extract|ReadMeFirst|ReadMeFirst.info|smod|imblock|join|delete|fv.lzh|ish.lzh|imi.lzh|dc.lzh|imb.lzh.partb|makedata.diag)")
  273.                    (files)
  274.         )
  275.     )
  276.     ( ; Else...
  277.         (copyfiles (source d1)
  278.                    (dest "ram:")
  279.                    (pattern "(bss|extract|ReadMeFirst|ReadMeFirst.info|smod|imblock|join|delete|fv.lzh|ish.lzh|imi.lzh|dc.lzh|ima.lzh.partb|makedata.diag)")
  280.                    (files)
  281.         )
  282.     )
  283. )
  284.  
  285. (if (= dev_install 1)
  286.     ( ; Then...
  287.         (copyfiles (source d1)
  288.                    (dest "ram:")
  289.                    (pattern "dd.lzh")
  290.                    (files)
  291.         )
  292.     )
  293. )
  294.  
  295. ; We've got the target; now we need to make sure that we have our main DIR
  296. ;-------------------------------------------------------------------------
  297. (set im_dest (tackon user_place "Imagemaster"))
  298. (if (not (exists im_dest))
  299.     ( ; Then...
  300.         (makedir im_dest (infos))
  301.     )
  302. )
  303. (makeassign "TMPTGT" im_dest (safe))
  304. (set @default-dest "TMPTGT:")
  305.  
  306. ; If it is _possible_ to put ApAssist in c:
  307. ;------------------------------------------
  308. (if (= app_in_c 1)
  309.     ( ; Then it is _possible_ to put ApAssist in c:
  310.         (if (= apa_install 1)
  311.             ( ; then they _want_ ApAssist in c:
  312.                 (copyfiles
  313.                     (source d1)
  314.                     (dest "c:")
  315.                     (pattern "ApAssist")
  316.                     (files)
  317.                 )
  318.             )
  319.             ( ; Else they do NOT want it in c:, put it in IM R/t location
  320.                 (set total_size (+ total_size apas_spc)) ; ApAssist executable
  321.                 (copyfiles
  322.                        (source d1)
  323.                        (dest "TMPTGT:")
  324.                        (pattern "ApAssist")
  325.                        (files)
  326.                 )
  327.             )
  328.         )
  329.     )
  330.     ( ; Else not possible for it to fit in c:, goes to IM dir
  331.         (copyfiles
  332.             (source d1)
  333.             (dest "TMPTGT:")
  334.             (pattern "ApAssist")
  335.             (files)
  336.         )
  337.     )
  338. )
  339.  
  340. ; Create subordinate target strings
  341. ;----------------------------------
  342. (set rxpi_dir   "TMPTGT:rxpi")
  343. (set wipe_dir   (tackon rxpi_dir "wipes"))
  344. (set cmpi_dir   "TMPTGT:cmpi")
  345. (set ish_dir    "TMPTGT:IShapes")
  346. (set dev_dir    "TMPTGT:Developer")
  347. (set imdoc_dir  "TMPTGT:imdoc")
  348. (set imcat_dir  "TMPTGT:imcat")
  349. (set lib_dir    "libs:")
  350. (set rexx_dir   "rexx:")
  351.  
  352. ; Create targets for assign statements for user-startup file
  353. ;-----------------------------------------------------------
  354. (set vrxpi_dir   (tackon im_dest "rxpi"))
  355. (set vwipe_dir   (tackon rxpi_dir "wipes"))
  356. (set vcmpi_dir   (tackon im_dest "cmpi"))
  357. (set vish_dir    (tackon im_dest "IShapes"))
  358. (set vdev_dir    (tackon im_dest "Developer"))
  359. (set vimdoc_dir  (tackon im_dest "imdoc"))
  360. (set vimcat_dir  (tackon im_dest "imcat"))
  361.  
  362. ; Create RXPI drawer if it's not already there
  363. ; and if user doesn't have it custom assigned
  364. ; elsewhere
  365. ;---------------------------------------------
  366. (if (not (exists rxpi_dir))
  367.     ( ; Then...
  368.         (if (= as_made 0)
  369.             ( ; Then...
  370.                 (makedir rxpi_dir (infos))
  371.             )
  372.         )
  373.     )
  374. )
  375.  
  376. ; Create wipes drawer if it's not already there
  377. ;----------------------------------------------
  378. (if (not (exists wipe_dir))
  379.     ( ; Then...
  380.         (makedir wipe_dir (infos))
  381.     )
  382. )
  383.  
  384. ; Create CMPI drawer if it's not already there
  385. ; and if user doesn't have it custom assigned
  386. ; elsewhere
  387. ;---------------------------------------------
  388. (if (not (exists cmpi_dir))
  389.     ( ; Then...
  390.         (if (= as_made 0)
  391.             ( ; Then...
  392.                 (makedir cmpi_dir (infos))
  393.             )
  394.         )
  395.     )
  396. )
  397.  
  398. ; Create IShapes drawer if it's not already there
  399. ;------------------------------------------------
  400. (if (not (exists ish_dir))
  401.     ( ; Then...
  402.         (makedir ish_dir (infos))
  403.     )
  404. )
  405.  
  406. ; Create IMDOC drawer if it's not already there
  407. ; and if user doesn't have it custom assigned
  408. ; elsewhere
  409. ;----------------------------------------------
  410. (if (not (exists imdoc_dir))
  411.     ( ; Then...
  412.         (if (= as_made 0)
  413.             ( ; Then...
  414.                 (makedir imdoc_dir (infos))
  415.             )
  416.         )
  417.     )
  418. )
  419.  
  420. ; Create IMCAT drawer if it's not already there
  421. ; and if user doesn't have it custom assigned
  422. ; elsewhere
  423. ;----------------------------------------------
  424. (if (not (exists imcat_dir))
  425.     ( ; Then...
  426.         (if (= as_made 0)
  427.             ( ; Then...
  428.                 (makedir imcat_dir (infos))
  429.             )
  430.         )
  431.     )
  432. )
  433.  
  434. ; Make assignments so user can operate immediately
  435. ; If the user has already specially made these assignments,
  436. ; then we'll use those locations as targets instead
  437. ;----------------------------------------------------------
  438. (if (= as_made 0)
  439.     ( ; Then...
  440.         (makeassign "RXPI" rxpi_dir (safe))
  441.         (makeassign "CMPI" cmpi_dir (safe))
  442.         (makeassign "IMDOC" imdoc_dir (safe))
  443.         (makeassign "IMCAT" imcat_dir (safe))
  444.     )
  445. )
  446. (makeassign "IMIMIM" "TMPTGT:" (safe))
  447.  
  448. ; Extract this portion of the installation
  449. ;-----------------------------------------
  450. (run ("ram:extract >con:0/50/640/100/extract -m e ram:imi TMPTGT:"))
  451. (run ("ram:extract >con:0/50/640/100/extract -m e ram:fv TMPTGT:"))
  452. (run ("ram:extract >con:0/50/640/100/extract -m e ram:ish %s/" ish_dir))
  453.  
  454. ; Decide about .info file name
  455. ;-----------------------------
  456. (if (= float_install 0)
  457.     ( ; Then...
  458.         (if (exists "TMPTGT:imf.info")
  459.             (delete "TMPTGT:imf.info"))
  460.         (rename ("TMPTGT:iminfo") ("TMPTGT:imf.info"))
  461.     )
  462.     ( ; Else...
  463.         (if (exists "TMPTGT:im.info")
  464.             (delete "TMPTGT:im.info"))
  465.         (rename ("TMPTGT:iminfo") ("TMPTGT:im.info"))
  466.     )
  467. )
  468.  
  469. ; Clean up after these archives
  470. ;------------------------------
  471. (delete "ram:ish.lzh")
  472. (delete "ram:fv.lzh")
  473. (delete "ram:imi.lzh")
  474.  
  475. ; Install DCTV.Library
  476. ; --------------------
  477. (run ("ram:extract >con:0/50/640/100/extract -m e ram:dc ram:"))
  478. (copylib (source "ram:dctv.library") (dest "libs:"))
  479. (delete "ram:dc.lzh")
  480. (delete "ram:dctv.library")
  481.  
  482. ; Set variables pointing to the disk with the correct IM R/t archive
  483. ;-------------------------------------------------------------------
  484. (if (= float_install 0)
  485.     ( ; Then...
  486.         (set imp_src d3)
  487.         (set imv_src v3)
  488.         (set proc_file "imb.lzh.parta")
  489.         (run ("rename ram:imb.lzh.partb ram:iii.lzh"))
  490.     )
  491.     ( ; Else...
  492.         (set imp_src d2)
  493.         (set imv_src v2)
  494.         (set proc_file "ima.lzh.parta")
  495.         (run ("rename ram:ima.lzh.partb ram:iii.lzh"))
  496.     )
  497. )
  498.  
  499. ; Ask for the proper diskette
  500. ;----------------------------
  501. (askdisk
  502.     (prompt ("Please insert the %s diskette " imv_src))
  503.     (help " This diskette is absolutely required to complete this "
  504.           "installation! It contains the version of Imagemaster R/t "
  505.           "You requested (floating point, or non floating point).")
  506.     (dest imv_src)
  507. )
  508.  
  509. ; This gets the needed archive from the proper disk
  510. ;--------------------------------------------------
  511. (copyfiles (source imp_src)
  512.            (dest "ram:")
  513.            (pattern proc_file)
  514.            (files)
  515. )
  516.  
  517. ; Cojoin the fragments of the R/t archive and toss the sources
  518. ;-------------------------------------------------------------
  519. (run ("ram:join ram:%s ram:iii.lzh TO ram:ixi.lzh" proc_file))
  520. (delete ("ram:%s" proc_file))
  521. (delete "ram:iii.lzh")
  522.  
  523. ; Here, we extract the image processor, copying it at the same time
  524. ;------------------------------------------------------------------
  525. (run ("ram:extract >con:0/50/640/100/extract -m e ram:ixi.lzh TMPTGT:"))
  526.  
  527. ; Delete the joined image processor archive
  528. ;------------------------------------------
  529. (delete ("ram:ixi.lzh"))
  530.  
  531. ; If user wants the developer stuff, install it
  532. ;----------------------------------------------
  533. (if (= dev_install 1)
  534.     ( ; Then...
  535.         (if (not (exists dev_dir))
  536.             ( ; Then...
  537.                 (makedir dev_dir (infos))
  538.             )
  539.         )
  540.         (run ("ram:extract >con:0/50/640/100/extract -m e ram:dd %s/" dev_dir))
  541.         (delete "ram:dd.lzh")
  542.     )
  543. )
  544.  
  545. ; Install the ApAssist documentation
  546. ; ----------------------------------
  547. (askdisk
  548.     (prompt ("Please insert the %s diskette " v4))
  549.     (help " This diskette is required to complete the "
  550.           "installation. It contains part of the documentation "
  551.           "for the Imagemaster R/t software!")
  552.     (dest v4)
  553. )
  554. (copyfiles (source d4)
  555.            (dest "ram:")
  556.            (pattern "apa.lzh.parta")
  557.            (files)
  558. )
  559. ; Install the ApAssist documentation
  560. ; ----------------------------------
  561. (askdisk
  562.     (prompt ("Please insert the %s diskette " v5))
  563.     (help " This diskette is required to complete the "
  564.           "installation. It contains part of the documentation "
  565.           "for the Imagemaster R/t software!")
  566.     (dest v5)
  567. )
  568. (copyfiles (source d5)
  569.            (dest "ram:")
  570.            (pattern "apa.lzh.partb")
  571.            (files)
  572. )
  573.  
  574. ; Cojoin the fragments of the doc archive and toss the sources
  575. ;-------------------------------------------------------------
  576. (run "ram:join ram:apa.lzh.parta ram:apa.lzh.partb TO ram:apa.lzh")
  577. (delete "ram:apa.lzh.parta")
  578. (delete "ram:apa.lzh.partb")
  579.  
  580. ;Extract the complete archive
  581. ;----------------------------
  582. (run ("ram:extract >con:0/50/640/100/extract -m e ram:apa %s/" imdoc_dir))
  583. (delete "ram:apa.lzh")
  584. (copyfiles (source imdoc_dir)
  585.            (dest "TMPTGT:")
  586.            (pattern "IMRT_Manual")
  587.            (files)
  588.            (infos)
  589. )
  590. (delete (tackon imdoc_dir "IMRT_Manual"))
  591. (delete (tackon imdoc_dir "IMRT_Manual.info"))
  592.  
  593. ; Get the PI Module archive chunks....
  594. ;-------------------------------------
  595. (makedir "ram:gbzyx")
  596. (askdisk
  597.     (prompt ("Please insert the %s diskette " v6))
  598.     (help " This diskette is required to install "
  599.           "the PI Modules")
  600.     (dest v6)
  601. )
  602. (copyfiles (source d6)
  603.            (dest "ram:")
  604.            (pattern "piarc.lzh.parta")
  605.            (files)
  606. )
  607.  
  608. ; Get part B of the piarc.lzh file
  609. ;----------------------------------------------------------
  610. (askdisk
  611.     (prompt ("Please insert the %s diskette " v7))
  612.     (help " This diskette is required to install "
  613.           "the PI Modules.")
  614.     (dest v7)
  615. )
  616. (copyfiles (source d7)
  617.            (dest "ram:")
  618.            (pattern "piarc.lzh.partb")
  619.            (files)
  620. )
  621.  
  622. ; Now, enjoin the two lzh fragments back into a usable archive:
  623. ; -------------------------------------------------------------
  624. (run ("ram:join ram:piarc.lzh.parta ram:piarc.lzh.partb TO ram:piarc.lzh"))
  625.  
  626. ; Get rid of fragments
  627. ; --------------------
  628. (run ("ram:delete ram:piarc.lzh.part? QUIET"))
  629.  
  630. ; Now to get the PI modules installed
  631. ; Begin by backing up old macro file, if it exists
  632. ;-------------------------------------------------
  633. (if (exists "s:Default.immcr.old")
  634.     (delete "s:Default.immcr.old"))
  635. (if (exists "s:Default.immcr")
  636.     (rename "s:Default.immcr" "s:Default.immcr.old"))
  637. ;---------------
  638.  
  639. ; Old macros are backed up, ready for main PI install
  640. ; Extract the PI Modules
  641. ;----------------------------------------------------
  642. (run ("ram:extract >con:0/50/640/100/extract -m e ram:piarc ram:gbzyx/"))
  643. (delete "ram:piarc.lzh")
  644.  
  645. ; Archive is unpacked and ready to copy
  646. ; first, backup list.list if available
  647. ;--------------------------------------
  648. (if (exists "cmpi:list.list")
  649.     ( ; Then...
  650.         (if (exists "cmpi:list.list.old")
  651.             ( ; Then...
  652.                 (delete "cmpi:list.list.old")
  653.             )
  654.         )
  655.         (rename "cmpi:list.list" "cmpi:list.list.old")
  656.         (message "Please note that during installation, your previous "
  657.                  "\"list.list\" file was located and renamed to "
  658.                  "\"list.list.old\". All of your aftermarket PI "
  659.                  "modules (if any) are still intact, but will not "
  660.                  "show up on PI lists untill the new list.list file "
  661.                  "has been appropriately modified."
  662.          (help   " This has been done so that you may refer to it if "
  663.                  "you had aftermarket PI modules declared in it. "
  664.                  "A new list.list file has been created as part of "
  665.                  "this install procedure - you should use this new "
  666.                  "list.list file instead of the old one (that will "
  667.                  "happen automatically) but if you DID have any "
  668.                  "aftermarket PI modules, such as Metadigm's ES300c "
  669.                  "scanner driver, you'll need to add the control "
  670.                  "line(s) for it (them) into the new list.list file. "
  671.                  "You would then use the old list.list file as a template "
  672.                  "to accomplish this.")
  673.          )
  674.     )
  675. )
  676.  
  677. ; move the "odd" files (not PI rexx or PI cmds)
  678. ;----------------------------------------------
  679. (copyfiles (source "ram:gbzyx") (dest "rexx:")
  680.            (pattern "(picmdpath|launch.rexx|imtf.rexx)") (files))
  681. (copyfiles (source "ram:gbzyx") (dest "s:")
  682.            (pattern "(default.??mcr)") (files))
  683. (copyfiles (source "ram:gbzyx") (dest "cmpi:")
  684.            (pattern "list.list") (files))
  685. (copyfiles (source "ram:gbzyx") (dest "rxpi:wipes")
  686.            (pattern "#?.rxwp") (files))
  687. (copyfiles (source "ram:") (dest "TMPTGT:")
  688.            (pattern "ReadMeFirst#?") (files))
  689. (copyfiles (source "ram:") (dest "TMPTGT:")
  690.            (pattern "makedata.diag") (files))
  691. (delete "ram:makedata.diag")
  692. (delete "ram:ReadMeFirst")
  693. (delete "ram:ReadMeFirst.info")
  694. (delete "ram:gbzyx/picmdpath")
  695. (delete "ram:gbzyx/list.list")
  696. (delete "ram:gbzyx/launch.rexx")
  697. (delete "ram:gbzyx/imtf.rexx")
  698. (run "ram:delete ram:gbzyx/Default.??mcr QUIET")
  699. (run "ram:delete ram:gbzyx/#?.rxwp QUIET")
  700.  
  701. ; Next, copy all the PI ARexx scripts
  702. ;------------------------------------
  703. (copyfiles (source "ram:gbzyx") (dest "rxpi:")
  704.            (pattern "#?.rexx") (files))
  705. (run "ram:delete ram:gbzyx/#?.rexx QUIET")
  706.  
  707. ; Next, copy all the PI Commands
  708. ;-------------------------------
  709. (copyfiles (source "ram:gbzyx") (dest "cmpi:")
  710.            (pattern "#?") (files))
  711.  
  712. ; Now, we have to decide if we can install the FPU PI modules
  713. ;------------------------------------------------------------
  714. (if (exists "CMPI:rdjpg") (delete "CMPI:rdjpg"))
  715. (if (exists "CMPI:wrjpg") (delete "CMPI:wrjpg"))
  716. (if (= float_install 0)
  717.     ( ; Then...
  718.         (rename "CMPI:x_JPR030" "CMPI:rdjpg")
  719.         (rename "CMPI:x_JPW030" "CMPI:wrjpg")
  720.     )
  721.     ( ; Else...
  722.         (rename "CMPI:x_JPR000" "CMPI:rdjpg")
  723.         (rename "CMPI:x_JPW000" "CMPI:wrjpg")
  724.     )
  725. )
  726.  
  727. ; clean up
  728. ;---------
  729. (run "ram:delete CMPI:x_#? QUIET")
  730. (run "ram:delete ram:gbzyx/#? QUIET")
  731. (delete "ram:gbzyx")
  732. (delete "ram:extract")
  733. (delete "ram:delete")
  734. (delete "ram:join")
  735.  
  736. ; Check to see if there is a "user-startup" file in the user's s:
  737. ; directory. If not, put one there (with comments to show we did it)
  738. ;-------------------------------------------------------------------
  739. (if (not (exists "s:user-startup"))
  740.     ( ; then...
  741.         (run "c:copy ram:bss s:user-startup")
  742.     )
  743. )
  744.  
  745. ; Add assignment to user's "user-startup" directory for new boot ops
  746. ; IF they were not already correctly done - otherwise skip this part
  747. ;-------------------------------------------------------------------
  748. (if (= as_made 0)
  749.     ( ; Then...
  750.         (startup "Imagemaster"
  751.             (help " This operation adds lines to your user-startup file "
  752.                   "which are harmless assignment statements to drawers "
  753.                   "within the Imagemaster drawer, called \"IMIMIM:\", "
  754.                   "\"RXPI:\", \"IMDOC:\", \"IMCAT:\" and \"CMPI:\". Each "
  755.                   "time you boot your Amiga, these assignments are used to "
  756.                   "let Imagemaster's Public Interface \(PI\) drivers know "
  757.                   "where its data files reside. Unless you know that you "
  758.                   "have another assignment with one of these names, it is "
  759.                   "extremely unlikely that there would be any reason to "
  760.                   "NOT let this happen.")
  761.             (prompt "Is it o.k. to add five SAFE lines to your User-Startup "
  762.                     "file?")
  763.             (command ("assign RXPI: \"%s\"\n" vrxpi_dir))
  764.             (command ("assign CMPI: \"%s\"\n" vcmpi_dir))
  765.             (command ("assign IMDOC: \"%s\"\n" vimdoc_dir))
  766.             (command ("assign IMCAT: \"%s\"\n" vimcat_dir))
  767.             (command ("assign IMIMIM: \"%s\"\n" im_dest))
  768.         )
  769.     )
  770. )
  771.  
  772. (set shellstart
  773.     (askoptions
  774.         (prompt "As part of the usual install procedure, we "
  775.         "normally add a statement to your shell-startup file "
  776.         "which essentially teaches your Amiga how to find "
  777.         "Imagemaster R/t and its help manager from any shell "
  778.         "prompt - no matter what directory you are currently "
  779.         "\"cd'd\" to. We strongly suggest that you leave this "
  780.         "option checked, unless you are an expert with paths "
  781.         "and already have other plans in force that will "
  782.         "handle the path issues. Imagemaster R/t MUST have a "
  783.         "path to IMIMIM: if it is to be operated from the "
  784.         "shell at any time.")
  785.         (help @askoptions-help " This operation uses a custom "
  786.         "command written at Black Belt Systems which is able "
  787.         "to modify your shell-startup file. The changes are "
  788.         "made in such a way as to be clear to you, should you "
  789.         "even have the need to edit your shell-startup file "
  790.         "in the future. Allowing it to occur will cause no "
  791.         "ill-effects, even if at some later date you remove "
  792.         "the Imagemaster R/t drawer. Note that if you have "
  793.         "a shell open NOW, the path will not be available "
  794.         "there unless you add it manually. This is because "
  795.         "each shell has it's own path. The statement in the "
  796.         "shell-startup file added by this operation will "
  797.         "cause the path to be added each time a new shell "
  798.         "is opened. Since your current shell, if any, was "
  799.         "opened using the shell-startup file before we added "
  800.         "the new PATH statement, it does not have the path "
  801.         "required to launch Imagemaster R/t properly.")
  802.         (choices "Add PATH statement to your shell-startup?")
  803.         (default 1)
  804.     )
  805. )
  806.  
  807. (if (= shellstart 1)
  808.     (if (exists "s:shell-startup")
  809.         ( ; then...
  810.             (run "ram:smod s:shell-startup ram:imblock Imagemaster")
  811.         )
  812.         ( ; Else...
  813.             (run "c:copy ram:imblock s:shell-startup")
  814.         )
  815.     )
  816. )
  817.  
  818. (delete "ram:smod")
  819. (delete "ram:bss")
  820. (delete "ram:imblock")
  821.  
  822. (run "assign TMPTGT:")
  823. (set @default-dest im_dest)
  824. (exit)
  825.